package com.weijin.model.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.weijin.model.enums.AttendanceStatus;
import com.weijin.model.enums.AttendanceType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 考勤记录实体类
 *
 * @Author WeiJin
 * @Version 1.0
 * @Date 2025/3/28 9:51
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("考勤记录实体类")
public class Record {
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("员工id")
    private String userId;
    @ApiModelProperty("时间")
    private LocalDateTime time;
    @ApiModelProperty("考勤类型")
    private AttendanceType type;
    @ApiModelProperty("考勤状态")
    private AttendanceStatus status;

    public Record(String userId, LocalDateTime time, AttendanceType type) {
        this.userId = userId;
        this.time = time;
        this.type = type;
    }
}
